/*
 * Image.h
 *
 *  Created on: 03.09.2012
 *      Author: caffeine
 */

#ifndef IMAGE_H_
#define IMAGE_H_

#include "IElementImage.h"
#include <irrlicht.h>

namespace irr{
namespace gui{


class Image: public irr::gui::IElementImage {
private:
	irr::video::ITexture*texture;
public:
	Image(irr::video::ITexture*texture);
	virtual ~Image();
	virtual void render(irr::video::IVideoDriver*driver,irr::core::recti rect);
	virtual irr::u32 getMargin(MarginSide type);
	static Image*createImage(irr::video::IVideoDriver*driver,irr::io::path fileName);
	static Image*createImage(irr::video::IVideoDriver*driver,irr::io::IReadFile*file);
};

}//namespace gui
}//namespace irr

#endif /* IMAGE_H_ */
